package com.five.controller.backstage;

import com.five.dao.backstage.XuFangDao;
import com.five.entity.backstage.XuFang;
import com.five.util.LayTable;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * @ClassName XuFangController
 * @Description TODO
 * @Author yuanshuaiqiang
 * @Date 2020/12/6 18:32
 */
@RestController
@RequestMapping("xufang")
public class XuFangController {

    @Autowired
    private XuFangDao xuFangDao;
    @RequestMapping("queryAll")
    public LayTable queryAll(Integer page, Integer limit){
        List<Map> maps = xuFangDao.queryAll(page,limit);
        int i=xuFangDao.getcount();
        LayTable layTable = new LayTable(i, maps);
        return layTable;
    }
}
